<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>成功企业家俱乐部</title>
    <link rel="shortcut icon" href="images/tPic.ico"/>
    <link rel="stylesheet" href="css/base.css"/>
    <link rel="stylesheet" href="css/x1Common.css"/>
    <script src="js/x1Common.js"></script>
    <script src="js/common/main.js"></script>
    <script src="js/common/tool.js"></script>
    <script type="text/javascript">
    function logout() {
        $("#onload").show();

        $("#onload .sure").mousedown(function(){
            $(".sure img").attr("src","images/galert3.png");
        });
        $("#onload .sure").mouseup(function(){
            $(".sure img").attr("src","images/galert1.png");
            $("#onload").hide();
            $.ajax({
                url: "hxclub/authen/logout.do",
                async: false,
                type : "post",
                dataType : "json",
                success:function(d){
                    if(d.success){
                        $(".XCent").removeClass("xCentShow");
                        $(".XLogin").addClass("xCentShow");

                        var fromUrl = getSearchParam('redirectUrl');//是从fromUrl来到登录界面的，所以fromUrl应该设置
                        if(fromUrl != null && fromUrl != ''){
//                       alert("退出登录失败11")
                            window.location.href = fromUrl;
                        } else {//如果找不到上一张页面，则做浏览器退页操作
//                            alert("退出登录失败22")
                            window.location.href = 'index.html';
                        }
                    }
                    else{
                        alert("退出登录失败")
                    }
                }
            });

        });
        $("#onload .less").mousedown(function(){
            $(".less img").attr("src","images/galert4.png");
        });
        $("#onload .less").mouseup(function(){
            $(".less img").attr("src","images/galert2.png");
            $("#onload").hide();
        });

    	}
    </script>
</head>
<body>
<div id="onload">
    <p>确定退出登录？</p>
    <button class="del sure"><img src="images/galert1.png" alt=""/></button>
    <button class="less del"><img src="images/galert2.png" alt=""/></button>
</div>
    <div class="xHBox1 clearFix">
    <div class="xBL">
        <h2>成功企业家俱乐部欢迎您的加入！</h2>
    </div>
    <ul class="xBR">
   <!-- <li class="XLogin xCentShow"> -->
        <li class="XLogin">
            <a class="Xa" href="gApply.html">注册</a>
            <i>|</i>
            <a href="login.html">登录</a>
        </li>
        <li class="XCent">
            <a class="Xa" href="javascript:;" id="userRealName"></a>
            <i>|</i>
            <a href="gCenter.html">个人中心</a>
            <i>|</i>
            <a href="javascript:;" onclick="javascript:logout();">退出登陆</a>
        </li>
    </ul>
</div>
</body>
</html>